package one.stand.mapper;

import one.stand.dto.CollectionDto;
import one.stand.dto.CommentDto;
import one.stand.dto.LiveRoomDto;
import one.stand.dto.ThumbsDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RecordPublicMapper {
    Long selectCallCount(@Param("userId") Integer userId, @Param("cardId") Integer cardId, @Param("companyId") Integer companyId);

    List<Integer> selectCollectionUsers(@Param("itemType") Integer itemType, @Param("itemId") Integer itemId);

    CollectionDto selectCollection(@Param("userId") Integer userId, @Param("itemType") Integer itemType, @Param("itemId") Integer itemId);

    Integer selectFormIdCount(@Param("userId") Integer userId, @Param("type") Integer type);

    Long selectConsultCount(@Param("userId") Integer userId, @Param("cardId") Integer cardId, @Param("companyId") Integer companyId);

    LiveRoomDto selectLiveRoom(@Param("roomId") Integer roomId);

    /**
     * 是否点赞
     */
    int selectNums(@Param("userId") Integer userId, @Param("itemId") Integer itemId, @Param("itemType") Integer itemType);

    /**
     * 点赞次数
     */
    int selectNum(@Param("itemId") Integer itemId, @Param("itemType") Integer itemType);

    /**
     * 点赞人名单
     */
    String selectName(@Param("itemId") Integer itemId, @Param("itemType") Integer itemType);

    List<ThumbsDto> selectImg(@Param("itemId") Integer itemId, @Param("itemType") Integer itemType);

    Long selectCommentCount(@Param("userId") Integer userId, @Param("companyId") Integer companyId);

    Integer selectCommentCountByDynamic(@Param("type") Integer type, @Param("dynamicId") Integer dynamicId);

    List<CommentDto> selectCommentList(@Param("dynamicId") Integer dynamicId, @Param("limit") Integer limit);

    List<CommentDto> selectCommentListByUser(@Param("userId") Integer userId);

    /**
     * 人气值
     */
    Long selectCountPopularity(@Param("type") Integer type, @Param("itmeId") Integer itmeId);

}
